package org.example.runningforum.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.example.runningforum.modle.ArticleTopic;
import java.util.List;

@Mapper
public interface IArticleTopicMapper {
    //查询话题名称和数量
    List<ArticleTopic> selectCountAndName();


    @Insert("INSERT INTO article_topic (article_id, topic_id, created_at, updated_at) " +
            "VALUES (#{articleId}, #{topicId}, NOW(), NOW())")
    int insertArticleTopic(Long articleId, Long topicId);
}